// mock/index.js
const Mock = require('mockjs')

const Random = Mock.Random
const mock = Mock.mock

const proxy = {
  'GET /api/user/list': mock({
    code: '200',
    success: true,
    'object|3': [
      {
        id: 1,
        username: 'kenny',
        sex: 'male'
      }
    ]
  }),
  'POST /survey/minimall/question/save.do': mock({
    code: '200',
    success: true,
    result: null,
  }),
  'GET /survey/minimall/question/get-list-by-appid.do': mock({
    code: 200,
    message: '成功',
    result: {
      count: 6,
      list: [
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'blank',
          questionName: '您的姓名',
          questionDesc: null,
          questionSort: 0,
          requiredFlag: 1,
          questionContent: '[{}]',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0,
          outId: 'aq9nv10q3jaf'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'radio',
          questionName: '您在公司里面承担什么职责？\r\n您在公司里面承担什么职责？\r\n您在公司里面承担什么职责？',
          questionDesc: '1.我倾向于广泛但关系不紧密的人际圈\r\n2.我周末时喜欢外出，并参加各种聚会\r\n3.我周围的朋友们都说我是很开朗健谈的人\r\n4.我与他人相处时精力充沛\r\n5.我追求知识的广度而不是深度\r\nB\r\n1.我倾向于关系紧密但并不广泛的人际圈\r\n2.我周末时倾向于独自进行休闲活动\r\n3.我周围的朋友们都说我是很冷静沉着的人\r\n4.我独处时精力充沛\r\n5.我追求知识的深度而不是广度',
          questionSort: 1,
          requiredFlag: 1,
          questionContent: '[{"content":"A.创始人","index":1},{"content":"B.合伙人","index":2},{"content":"C.人力资源负责人","index":3},{"content":"D.财务负责人","index":4, "isBlank": true}]',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0,
          outId: 'aq9nv10q3jlj'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'checkbox',
          questionName: '公司是否存在对控制权进行了强化设置？',
          questionDesc: null,
          questionSort: 0,
          requiredFlag: 1,
          questionContent: '[{"content":"A.内部有通过搭建持股平台集中管理股权","index":1},{"content":"B.内部有签署一致行动人或委托投票权","index":2},{"content":"C.内部有设定优先股或AB股","index":3},{"content":"D.没有特殊安排","index":4,"isExclude":true}]',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0,
          outId: 'aq3nv10q3jlu2'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'checkbox',
          questionName: '表格联动多选演示？',
          questionDesc: null,
          questionSort: 0,
          requiredFlag: 1,
          questionContent: '[{"content":"A.选项1","index":1},{"content":"B.选项2","index":2},{"content":"C.选项3","index":3},{"content":"D.选项4","index":4},{"content":"E.选项5","index":4},{"content":"F.选项6","index":4,"isExclude":true}]',
          questionMin: 1,
          questionMax: 3,
          questionTag: null,
          score: 0,
          outId: 'aq3nv10q3jlu9'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'sort',
          questionName: '请您根据以下描述，按照最接近您的想法进行排序，最接近的排序为"1"，依次类推，您需要排序直至您认为剩下的描述完全不像您',
          questionDesc: null,
          questionSort: 0,
          requiredFlag: 1,
          questionContent: '[{"content":"我希望做我擅长的工作，我会感到特别满意。","index":1},{"content":"只有在我成为公司的总经理后，我才认为我的职业人生是成功的。对我而言，做一个全面管理者更有吸引力。","index":2},{"content":"我宁愿离开公司，也不愿意接受约束我自由和自主控制权的工作。","index":3},{"content":"我希望有一份让我有安全感和稳定感的工作。","index":4},{"content":"我一直在寻找可以让我创建自己IP的创意(点子) 。","index":5}]',
          questionMin: 1,
          questionMax: 3,
          questionTag: null,
          score: 0,
          outId: 'aq9nv10q3jl5'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'sort',
          questionName: '请您根据以下描述，按照最接近您的想法进行排序，最接近的排序为"1"，依次类推，您需要排序直至您认为剩下的描述完全不像您',
          questionDesc: null,
          questionSort: 0,
          requiredFlag: 1,
          questionContent: '[{"content":"我希望做我擅长的工作，我会感到特别满意。","index":1},{"content":"只有在我成为公司的总经理后，我才认为我的职业人生是成功的。对我而言，做一个全面管理者更有吸引力。","index":2},{"content":"我宁愿离开公司，也不愿意接受约束我自由和自主控制权的工作。","index":3},{"content":"我希望有一份让我有安全感和稳定感的工作。","index":4},{"content":"我一直在寻找可以让我创建自己IP的创意(点子) 。","index":5}]',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0,
          outId: 'aq9nv10q3jl5'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'forced-choice',
          questionName: '您在公司里面承担什么职责？\r\n您在公司里面承担什么职责？\r\n您在公司里面承担什么职责？',
          questionDesc: '我倾向于广泛但关系不紧密的人际圈',
          questionSort: 1,
          requiredFlag: 1,
          questionContent: '{"content":[["A：","1.我倾向于广泛但关系不紧密的人际圈","2.我周末时喜欢外出，并参加各种聚会","3.我周围的朋友们都说我是很开朗健谈的人","4.我与他人相处时精力充沛","5.我追求知识的广度而不是深度"],["B：","1.我倾向于关系紧密但并不广泛的人际圈","2.我周末时倾向于独自进行休闲活动","3.我周围的朋友们都说我是很冷静沉着的人","4.我独处时精力充沛","5.我追求知识的深度而不是广度"]],"desc":"请根据您的实际情况点击选框您跟AB描述的符合程度，越往左越符合A，越往右越符合B","level":["A描述完全符合","A描述非常符合","A描述比较符合","A描述有点符合","无法判断","B描述有点符合","B描述比较符合","B描述非常符合","B描述完全符合"]}',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0,
          outId: 'aq9nv10q3jl1'
        },
        {
          surveyId: 'aq6upwqb9dd12',
          questionType: 'forced-choice',
          questionName: '您在公司里面承担什么职责？\r\n您在公司里面承担什么职责？\r\n您在公司里面承担什么职责？',
          questionDesc: '我倾向于广泛但关系不紧密的人际圈',
          questionSort: 1,
          requiredFlag: 1,
          questionContent: '{"content":[["A：","1.我倾向于广泛但关系不紧密的人际圈","2.我周末时喜欢外出，并参加各种聚会","3.我周围的朋友们都说我是很开朗健谈的人","4.我与他人相处时精力充沛","5.我追求知识的广度而不是深度"],["B：","1.我倾向于关系紧密但并不广泛的人际圈","2.我周末时倾向于独自进行休闲活动","3.我周围的朋友们都说我是很冷静沉着的人","4.我独处时精力充沛","5.我追求知识的深度而不是广度"]],"desc":"请根据您的实际情况点击选框您跟AB描述的符合程度，越往左越符合A，越往右越符合B","level":["A描述完全符合","A描述非常符合","A描述比较符合","A描述有点符合","无法判断","B描述有点符合","B描述比较符合","B描述非常符合","B描述完全符合"]}',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0,
          outId: 'aq9nv10q3jl12'
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'table-question',
          questionName: '这是表格联动多选题',
          questionDesc: '这是表格联动多选题的描述',
          questionSort: 0.0,
          requiredFlag: 0,
          questionContent: '{"row":[{"link": "aq3nv10q3jlu9"}],"column":[{"header":"第一列","columnId":"firstId","choices":[{"content":"one-first-1111-fffsdfsfds-sdfsdf-sdfsdf","lable":1},{"content":"one-tow","index":2},{"content":"one-three","index":3},{"content":"one-1","index":1},{"content":"one-2","index":2},{"content":"one-3","index":3},{"content":"one-4","index":1},{"content":"one-5","index":2},{"content":"one-6","index":3}]},{"header":"第二列","columnId":"secondId","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"第三列","columnId":"one","choices":[{"content":"one-first-1111-fffsdfsfds-sdfsdf-sdfsdf","lable":1},{"content":"one-tow","index":2},{"content":"one-three","index":3},{"content":"one-1","index":1},{"content":"one-2","index":2},{"content":"one-3","index":3},{"content":"one-4","index":1},{"content":"one-5","index":2},{"content":"one-6","index":3}]}]}',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0.0,
          outId: 'aq2nv10a3jlb2',
        },
        {
          surveyId: 'aq6upwqb9dd',
          questionType: 'table-question',
          questionName: '这是固定标题表格题',
          questionDesc: '这是固定标题表格题的描述',
          questionSort: 0.0,
          requiredFlag: 0,
          questionContent: '{"row":["标题1标题2标题1标题2","third"],"column":[{"header":"第一列","columnId":"one","choices":[{"content":"one-first-1111-fffsdfsfds-sdfsdf-sdfsdf","lable":1},{"content":"one-tow","index":2},{"content":"one-three","index":3},{"content":"one-1","index":1},{"content":"one-2","index":2},{"content":"one-3","index":3},{"content":"one-4","index":1},{"content":"one-5","index":2},{"content":"one-6","index":3}]},{"header":"one","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"第二列","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"one","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"one","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"one","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"one","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]},{"header":"one","columnId":"one","choices":[{"content":"one-first","index":1},{"content":"one-tow","index":2},{"content":"one-three","index":3}]}]}',
          questionMin: 0,
          questionMax: 0,
          questionTag: null,
          score: 0.0,
          outId: 'aq2nv10a3jlb2',
        }
      ]
    },
    requestId: null
  }),
  'POST /api/login/account': (req, res) => {
    return res.json({
      code: '200',
      success: true,
      object: {
        id: Random.id(),
        userName: Random.cname(),
        city: Random.city()
      }
    })
  }
}

module.exports = proxy
